import { AlarmItem } from "/@/api/aiot/alarm/models";
import type { PaginationParam, SearchModel } from "/@/api/models";
export interface NotifiReqItem {
  createBy: string;
  createOnBegin?: string;
  createOnEnd?: string;
  sendState: string;
  title: string;
}
export interface NotifiItem {
  content: string;
  sendState: string;
  title: string;
  createdBy: string;
  createdOn: string;
  equipmentName: string;
  faultType: string;
  faultTypeName: string;
  id: string;
  location: string;
  orderCode: string;
  projectName: string;
  readFlag: number;
  workOrderId: string;
  level: string;
  levalName: string;
  alarmEventId: string;
  alarmEvent: AlarmItem;
  workOrderClass: string;
}

export type PartialNotifiItem = Partial<NotifiItem>;

export interface NotifiDetailReq {
  id: string;
}

export interface CoutItem {
  companyCount: string;
  companyUnreadCount: string;
  platformCount: string;
  platformUnreadCount: string;
  workOrderCount: string;
  workOrderUnreadCount: string;
  alarmCount: string;
  alarmUnreadCount: string;
}
export type ParCoutItem = Partial<CoutItem>;
export interface WorkOrderSearchReq {
  createdOnBegin: string;
  createdOnEnd: string;
  faultType: string;
  readFlag: number;
}
export interface AlarmSearchReq {
  countType: string;
}

export interface AlarmCountItem {
  alarmCount: number;
  id: string;
  name: string;
  readFlag: number;
  logo: string;
}

export interface CompanyExpose {
  reloadTable: (params?: SearchModel | PaginationParam<SearchModel> | undefined) => void;
}

export interface ReadAdviceItem {
  adviceId: string;
  adviceType: "PLATFORM" | "COMPANY" | "WORK_ORDER" | "ALARM";
}

export enum NotifiStatus {
  SENT = "SENT",
  DRAFT = "DRAFT",
}

export interface AdviceSetting {
  companyDisable: number;
  platformDisable: number;
  workOrderDisable: number;
}

export interface AlarmGroupItem {
  alarmType?: string;
  alarmTypeName?: string;
  alarmCount?: number;
  projectId?: string;
  projectLogo?: string;
  projectName?: string;
  readFlag?: number;
}
